// 弹窗通用mixin
export default {
  data() {
    return {
      initData: {},
      visible: false
    }
  },
  methods: {
    show(data) {
      if (data) this.initData = data
      this.visible = true
    },
    handleCancel() {
      this.visible = false
    },
    handleOk() {
      this.visible = false
      this.$emit('ok')
    }
  }
}
